package com.geezdata.cps.base.exceptions;

import com.geezdata.cps.base.enums.ErrorCode;

public class MyException extends RuntimeException {
	private static final long serialVersionUID = 1L;
	
	private int code;
	
	public MyException(ErrorCode errorCode) {
        super(errorCode.getDesc());
        this.code = errorCode.getCode();
    }
    
    public MyException(int code, String message) {
        super(message);
        this.code = code;
    }
    
    public int getCode() {
        return code;
    }
    
    public void setCode(int code) {
        this.code = code;
    }
}
